package com.example.api.mapper;


import com.example.api.vo.BookVO;
import com.github.pagehelper.Page;
import com.example.api.pojo.Book;
import com.example.api.query.BookQuery;
import com.example.api.vo.BookListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface BookMapper {

    List<BookListVO> find(BookQuery bookQuery);


    void update(Book book);

    BookVO findByNum(String num);

    @Select("select status from t_book where num = #{num}")
    byte findStatus(String num);

    void add(Book book);

    Book findOrderByNum(String num);

    List<BookVO> findApp(BookQuery bookQuery);
}
